<template>
  <el-dialog v-model="visible" :title="title" width="700" show-footer show-zoom resize @close="close">
    <template #default>
      <el-table :data="tableData" border style="width: 100%" highlight-current-row :header-cell-style="{
            background: '#F6FAFF'
          }" height="500">
      <el-table-column prop="receipt_number" label="采购单号" />
      <el-table-column prop="sku" label="SKU" width="180" />
      <el-table-column prop="num" label="数量" width="100" />
      <el-table-column prop="create_time" label="操作时间" width="180" />
    </el-table>
    </template>

    <template #footer>
      <div class="flex justify-center py-2">
        <el-button @click="close">关闭</el-button>
      </div>
    </template>
  </el-dialog>
</template>
<script setup name="ComModal">
import { getDownOrder } from '../api/index'
import { reactive, ref, toRefs } from 'vue'
import { ElMessage } from 'element-plus'

const visible = ref(false)
const loading = ref(false)
const formRef = ref(null)
const emits = defineEmits(['query'])

const props = defineProps({
  options: {
    type: Object,
    default: {},
  },
})

const data = reactive({
  tableData: [],
  title: ''
})
const { tableData,title } = toRefs(data)

const open = (type,list) => {
  title.value = type
  tableData.value = list
  visible.value = true
}


// const getDetail = async (id) => {
//   try {
//     const res = await getDownOrder({
//       down_order: id
//     })
//     tableData.value = res.data
//     filterList()
//   } catch (e) {
//     throw Error(e)
//   }
// }

const print = ()=>{

}

const close = () => {
  tableData.value = []
  visible.value = false
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
.borderNone {
  :deep(.el-input__wrapper) {
    border: none;
    box-shadow: none
  }
}
</style>
